< previous page page_426 next page >

Page 426
Table 11.2. The menu table for the graph library form.
CaptionMenu
&FilemnuFile
&SavemnuFileItem(0)
&CopymnuFileItem(1)
-mnuFileItem(2)
&PrintmnuFileItem(3)
Print Set&UpmnuFileItem(4)
-mnuFileItem(5)
E&xitmnuFileItem(6)
&ViewmnuView
&Pie ChartmnuViewItem(0)
&Bar GraphmnuViewItem(1)
&Line ChartmnuViewItem(2)
&Area GraphmnuViewItem(3)

Note that you are building menu arrays with the form. Menu arrays, like other control arrays, can speed the processing of your program and simplify the coding and maintenance of your forms.
You need to add some code to this form. But first, save it (FRMGRAPH.FRM) and save the project (PRJDATAGRAPH.VBP). Then add the code in Listing 11.7 to the Form_Load event of the project. This sets the default size of the form to fill 75% of the screen.
Type.gifListing 11.7. Coding the Form_Load event.
Private Sub Form_Load()
    '
    ' set initial form size
    '
    If Me.WindowState = vbNormal Then
        Me.Width = Screen.Width * 0.75
        Me.Height = Screen.Height * 0.75
    End If
    '
End Sub

 
< previous page page_426 next page >

If you like this book, buy it!